package com.woniu.outlet.dao;

import com.woniu.outlet.po.WorkerPo;
import com.woniu.outlet.po.WorkerPoExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface WorkerPoMapper {
    long countByExample(WorkerPoExample example);

    int deleteByExample(WorkerPoExample example);

    int deleteByPrimaryKey(Long id);

    int insert(WorkerPo record);

    int insertSelective(WorkerPo record);

    List<WorkerPo> selectByExample(WorkerPoExample example);

    WorkerPo selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") WorkerPo record, @Param("example") WorkerPoExample example);

    int updateByExample(@Param("record") WorkerPo record, @Param("example") WorkerPoExample example);

    int updateByPrimaryKeySelective(WorkerPo record);

    int updateByPrimaryKey(WorkerPo record);

    @Select("select * from ERP_worker where username=#{username}")
    WorkerPo selectByUserName(String userName);

    @Select("select password from ERP_worker where account=#{account}")
    String selectByAccount(String account);

//    @Select("select id from ERP_worker where username=#{username}")
//    Integer selectByCode(String code);
}